add request cycle and more detailed explanation of mvc#636
add request cycle and more detailed explanation of mvc#636CZagrobelny wants to merge 5 commits intorailsbridge:mainfrom
Conversation
|
@javierjulio @maxjacobson please take a look! |
javierjulio
left a comment
There was a problem hiding this comment.
@CZagrobelny this looks great thanks! I only have two comments. One is just to use rails over rake for consistency and the other is just a little more content on partials.
| end | ||
| ``` | ||
|
|
||
| `rake db:migrate` is a task provided by the Rails framework. It uses the migration file we just created (`db/migrate/201xxxxxxxxxxx_create_topics.rb`) to change the database. |
| message "You may have noticed that the page for new topics and the page to edit topics looked similar. That's because they both use the | ||
| code from this file to show a form. This file is called a | ||
| partial since it only contains code for part of a page. Partials | ||
| always have filenames starting with an underscore character." |
There was a problem hiding this comment.
This is fine but it felt like a raw definition without giving much clear reason as to why we'd use partials. We can expand just a little bit. I only changed the last 2 sentences. The additions are marked in bold:
This file is called a partial since it only contains code for rendering part of a page. Partials are easy to spot as the filename always starts with an underscore character. They are great for organizing page rendering code into smaller, manageable parts.
I like this since it highlights two important parts: convention and maintenance.
|
@rachelfenn would love to get a review on this when you have a chance! Please let me know if you have any questions! Thank you! |
This PR Contains:
We workshopped these changes over the course of a year with the NYC Railsbridge workshops. We found that a deeper understanding of MVC, Request Cycle, and Databases was very helpful throughout the Intro to Rails tutorial. We also saw real value in substituting visuals and exercises with text where possible.